<template>
  <div class="Ability">
    <div class="page-head">
      <div class="page-title">
        能力支撑
      </div>
      
    </div>
  </div>
</template>

<script>
import { limit } from '@/consts/consts'
export default {
  data() {
    return {
      limit,
      total: 0,
      offset: 0,
      tableData: [],
      model: {
        type: 'add',
        visible: false
      },
      form: {
        name: '',
        roles: {}
      },
      imageUrl: ''
    }
  },
  methods: {

    handleAdd() {
      this.model.type = 'add'
      this.model.visible = true
    },
    
    getChangePage(val) {

    },

    handleAvatarSuccess(res, file) {
      
    },
    beforeAvatarUpload(file) {
      const isJPG = file.type === 'image/jpeg';
      const isLt2M = file.size / 1024 / 1024 < 2;

      if (!isJPG) {
        this.$message.error('上传头像图片只能是 JPG 格式!');
      }
      if (!isLt2M) {
        this.$message.error('上传头像图片大小不能超过 2MB!');
      }
      return isJPG && isLt2M;
    }
  },
}
</script>

<style lang="stylus">
.Ability {

}
</style>